<?php
/**
 *file-level documentation
 *@author Name <email@exp.com>
 *28 May 2012
 *@copyright Copyright (c) 2012, Tuncay Bakan
 *@package somePackage
 *
 */
/**
 *
 */
class TextLanguage_Model extends Model{
    protected $oDBInstance;

    public function __construct(){
        $this->oDBInstance = Mysql_dbconnection::getInstance();

    }


    public function getTextByName($sName, $iLanguage){
        $sName = $this->oDBInstance->getSQLValueString($sName,'string');
        $iLanguage = $this->oDBInstance->getSQLValueString($iLanguage,'int');
        $this->oDBInstance->query("SELECT content FROM bs_text_language WHERE name = $sName AND lid = '$iLanguage'");
        $aResult = $this->oDBInstance->fetch('array');
        if(isset($aResult[0]['content'])){
        return $aResult[0]['content'];
        }else{
             return "";
        }
    }

   
}
